package com.doit.demo04;

import java.io.FileNotFoundException;

public class test {
    public static void main(String[] args) {
        try {
            method(1);
        } catch (FileNotFoundException e) {
            System.out.println(e.getMessage());
            System.out.println(e.toString());

            e.printStackTrace();
        }
    }
    public static void method(int a) throws FileNotFoundException {
        if(a==1)
        {
            throw new FileNotFoundException("没有找到文件");
        }
        System.out.println("程序正常执行");
    }
}
